<?php 
    $action = Yii::app()->controller->action->id;
    if($action=="gameOnlineList"){
        $type=1;
        $folder="game";
        $title_page = "Game Online";
        $icon_name="tenweb-icon-game.png";
    }else if($action=="gameOfflineList"){
            $type=1;
            $folder="game";
            $title_page = "Game Offline";
            $icon_name="tenweb-icon-game.png";
        }else{
            $folder="app";
            $icon_name="tenweb-icon-ungdung.png";
            $title_page = "App";
            $type=2;           
    }                            
?>
<!-- box login -->
<?php $this->renderPartial("application.views.layouts._menu");?>
<!-- end box login --> 
<div class="about">
    <?php $this->widget("BoxLogin");?>
    <h1><a><img class="kc_TB_td" alt="" src="<?php echo Yii::app()->params['static_url'];?>images/<?php echo $icon_name; ?>"></a><a class="xanhdam" href="#"><?php echo $title_page; ?></a>
    </h1>
    <div class="Clip">
        <a class="<?php if($order==0){echo "button_Clip_1";}else{echo "button_Clip_2";} ?>" href="<?php echo Url::createUrl("service/".$action,array("t"=>0)); ?>" name="isNew">Mới Nhất</a>
        <a class="<?php if($order==1){echo "button_Clip_1";}else{echo "button_Clip_2";} ?>" href="<?php echo Url::createUrl("service/".$action,array("t"=>1)); ?>" name="isHot">Hot Nhất</a>
    </div>
    <?php foreach($data_app as $key=>$value){ ?>
        <div class="Game_offline">
            <div class="Clip_2_left">
                <img width="90" height="87" alt="" src="<?php echo Common::getImage($value['picture'],$folder,$value['create_date'],''); ?>">
            </div>
            <div class="Clip_2_right">
                <strong class="font14 xanhdam"><a href="<?php echo Url::createUrl("service/applicationDetail",array("alias"=>$value['alias'],"id"=>$value['id'],"type"=>$type)) ?>" class="chu_User"><?php echo $value['title'];  ?></a></strong><br>
                <?php echo $value['introtext']; ?><br>
                <strong>Chia sẻ</strong> <a class="do"><?php echo $value['percent_wapmaster']."%" ?></a>(Sms, Card)<br>
                Hỗ Trợ
                <?php if($value['isJava']==1){ ?>
                <img width="15" height="15" alt="" src="<?php echo Yii::app()->params['static_url'];?>images/tenweb-icon-Java.png">
                <?php } ?>
            <?php if($value['isAndroid']==1){ ?>
                <img width="15" height="15" alt="" src="<?php echo Yii::app()->params['static_url'];?>images/tenweb-icon-Androi.png">
                <?php } ?>
            <?php if($value['isIos']==1){ ?> 
                <img width="15" height="15" alt="" src="<?php echo Yii::app()->params['static_url'];?>images/tenweb-icon-Apple.png">
                <?php } ?>
            <?php if($value['isRim']==1){ ?>
                <img width="15" height="15" alt="" src="<?php echo Yii::app()->params['static_url'];?>images/tenweb-icon-Backbary.png">
                <?php } ?>
                
            </div>
            <div class="both"></div>
            <p><strong>Thông tin:</strong> <a class="xanhDV" href="<?php echo Url::createUrl("service/review",array("alias"=>$value['alias'],"id"=>$value['id'],"type"=>$type)) ?>"> Giới thiệu</a>  | <a href="<?php echo Url::createUrl("home/eventDetail",array("id"=>$value['id'],"alias"=>$value['alias'])); ?>" class="xanhDV"> Sự kiện </a><br>Download: <a class="do"><?php echo $value['download'] ?></a></p>
        </div>
        <?php } ?>
    <div class="BC_nd_2">

        <?php 
            if($numberPage > 1) { 

                if($action=="gameOnlineList"){
                    $url = Url::createUrl("service/gameOnlineList",array("t"=>$order));
                    $url1 = rtrim($url,"/");
                    $url.='/';
                }else if($action=="gameOfflineList"){
                        $url = Url::createUrl("service/gameOfflineList",array("t"=>$order));
                        $url1 = rtrim($url,"/"); 
                        $url.='/';
                    }else if($action=="appList"){
                            $url = Url::createUrl("service/appList",array("t"=>$order));
                            $url1 = rtrim($url,"/"); 
                            $url.='/';
                        }

                echo Paging::show_paging_wap_user($numberPage,$currentPage,$url,$url1); 
            } 
        ?> 
    </div>
    <!-- box footer -->
    <?php $this->widget("BoxFooter");?>
    <!-- end box footer -->
  </div>
